text history: Update state when enabled changes
authorMatthias Clasen <mclasen@redhat.com>
Sun, 6 Sep 2020 20:59:56 +0000 (16:59 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 6 Sep 2020 21:02:00 +0000 (17:02 -0400)
This makes can-undo go FALSE when we disable the
text history, as it should.

gtk/gtktexthistory.c

index fc80b892a5610e606be91328dfbb18a2fec31632..645d1822ebd925dd58bdbc5334b643b2929b5380 100644 (file)
@@ -1037,6 +1037,8 @@ gtk_text_history_set_enabled (GtkTextHistory *self,
           clear_action_queue (&self->undo_queue);
           clear_action_queue (&self->redo_queue);
         }
+
+      gtk_text_history_update_state (self);
     }
 }